package com.j2eefast.flowable.bpm.controller;

import com.j2eefast.common.core.business.annotaion.BussinessLog;
import com.j2eefast.common.core.enums.BusinessType;
import com.j2eefast.common.core.utils.*;
import com.j2eefast.flowable.bpm.entity.BpmTaskEntity;
import com.j2eefast.flowable.bpm.entity.BpmTaskFromEntity;
import com.j2eefast.flowable.bpm.entity.bpmCrmSaleorderEntity;
import com.j2eefast.flowable.bpm.enums.CommentOSSType;
import com.j2eefast.flowable.bpm.service.BpmTaskFromService;
import com.j2eefast.framework.annotation.RepeatSubmit;
import com.j2eefast.common.core.controller.BaseController;
import com.j2eefast.framework.utils.UserUtils;
import com.j2eefast.system.oss.entity.SysOssEntity;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.ui.ModelMap;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Date;
import org.springframework.web.bind.annotation.*;
import com.j2eefast.flowable.bpm.entity.ClueEntity;
import com.j2eefast.flowable.bpm.service.ClueService;

/**
 * 线索池页面控制器
 * @author yhli
 * @date 2020-06-30 16:41
 */
@Controller
@RequestMapping("/bpm/Clue")
public class ClueController extends BaseController{

    private String prefix = "modules/bpm/Clue";
    @Autowired
    private ClueService clueService;
    /**
    * 必须注入实例关联表单服务
    */
    @Autowired
    private BpmTaskFromService bpmTaskFromService;


    @RequiresPermissions("bpm:Clue:view")
    @GetMapping()
    public String Clue(){
        return prefix + "/Clue";
    }
        
    @RequestMapping("/list")
    @RequiresPermissions("bpm:Clue:list")
    @ResponseBody
    public ResponseData list(@RequestParam Map<String, Object> params,ClueEntity clueEntity) {
		PageUtil page = clueService.findPage(params,clueEntity);
		return success(page);
    }

    /**
     * 表单详情
     * @return
     */
    @RequestMapping("/sing")
    @ResponseBody
    public ClueEntity view(@RequestParam(value="id", required=true)Long id){
       ClueEntity entity= clueService.getClueById(id);
        return entity;
    }

    
}
